<html>
<head><meta charset="utf-8"><title>Use of `LocalDefId` · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Use.20of.20.60LocalDefId.60.html">Use of `LocalDefId`</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="193085870"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Use%20of%20%60LocalDefId%60/near/193085870" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dylan MacKenzie (ecstatic-morse) <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Use.20of.20.60LocalDefId.60.html#193085870">(Apr 06 2020 at 18:57)</a>:</h4>
<p>Should we be using <code>LocalDefId</code> wherever possible? Specifically, the <code>Item</code>/<code>ConstCx</code> type used during const checking keeps a <code>DefId</code> for the item being const checked, which is always local. I frequently see code that assumes regular <code>DefId</code>s are local. Is migrating these cases to use <code>LocalDefId</code> worthwhile?</p>



<a name="193087246"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Use%20of%20%60LocalDefId%60/near/193087246" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Use.20of.20.60LocalDefId.60.html#193087246">(Apr 06 2020 at 19:08)</a>:</h4>
<p><span class="user-mention" data-user-id="118594">@ecstatic-morse</span> ugh I meant to start going through those but I forgot since I lost my tabs</p>



<a name="193087292"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Use%20of%20%60LocalDefId%60/near/193087292" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Use.20of.20.60LocalDefId.60.html#193087292">(Apr 06 2020 at 19:08)</a>:</h4>
<p>feel free to do this sort of thing locally</p>



<a name="193087376"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Use%20of%20%60LocalDefId%60/near/193087376" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dylan MacKenzie (ecstatic-morse) <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Use.20of.20.60LocalDefId.60.html#193087376">(Apr 06 2020 at 19:09)</a>:</h4>
<p>Want me to open a tracking issue? Seems like a nice <code>E-easy</code> project for newcomers.</p>



<a name="193087393"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Use%20of%20%60LocalDefId%60/near/193087393" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Use.20of.20.60LocalDefId.60.html#193087393">(Apr 06 2020 at 19:09)</a>:</h4>
<p>heh good point</p>



<a name="193087410"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Use%20of%20%60LocalDefId%60/near/193087410" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Use.20of.20.60LocalDefId.60.html#193087410">(Apr 06 2020 at 19:09)</a>:</h4>
<p>lemme find the WIP PR I had a while back, I forget what I put in it</p>



<a name="193087511"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Use%20of%20%60LocalDefId%60/near/193087511" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Use.20of.20.60LocalDefId.60.html#193087511">(Apr 06 2020 at 19:10)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/pull/66132" title="https://github.com/rust-lang/rust/pull/66132">https://github.com/rust-lang/rust/pull/66132</a></p>



<a name="193087581"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Use%20of%20%60LocalDefId%60/near/193087581" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Use.20of.20.60LocalDefId.60.html#193087581">(Apr 06 2020 at 19:10)</a>:</h4>
<p>just this commit is new: <a href="https://github.com/rust-lang/rust/pull/66132/commits/b3c2aebfeab0b918b1bc8f7293084b91d147966a" title="https://github.com/rust-lang/rust/pull/66132/commits/b3c2aebfeab0b918b1bc8f7293084b91d147966a">https://github.com/rust-lang/rust/pull/66132/commits/b3c2aebfeab0b918b1bc8f7293084b91d147966a</a></p>



<a name="193087645"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Use%20of%20%60LocalDefId%60/near/193087645" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Use.20of.20.60LocalDefId.60.html#193087645">(Apr 06 2020 at 19:11)</a>:</h4>
<p>I guess I only did a small preview</p>



<a name="193091649"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Use%20of%20%60LocalDefId%60/near/193091649" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dylan MacKenzie (ecstatic-morse) <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Use.20of.20.60LocalDefId.60.html#193091649">(Apr 06 2020 at 19:46)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/issues/70853" title="https://github.com/rust-lang/rust/issues/70853">#70853</a></p>



<a name="193095572"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Use%20of%20%60LocalDefId%60/near/193095572" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Use.20of.20.60LocalDefId.60.html#193095572">(Apr 06 2020 at 20:17)</a>:</h4>
<p>thanks!</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>